package demo07.remote.object;

//热水浴缸
public class Hottub {
	boolean on;//开关
	int temperature;//温度

	public Hottub() {
	}

	public void on() {
		on = true;
	}

	public void off() {
		on = false;
	}

	public void bubblesOn() {
		if (on) {
			System.out.println("热水浴缸在冒泡!");
		}
	}

	public void bubblesOff() {
		if (on) {
			System.out.println("热水浴缸不冒泡");
		}
	}

	public void jetsOn() {//开关
		if (on) {
			System.out.println("热水浴缸开关打开了");
		}
	}

	public void jetsOff() {
		if (on) {
			System.out.println("热水浴缸开关关闭了");
		}
	}

	public void setTemperature(int temperature) {
		this.temperature = temperature;
	}

	public void heat() {
		temperature = 105;
		System.out.println("热浴浴缸加热到度55℃。");
	}

	public void cool() {
		temperature = 98;
		System.out.println("热浴浴缸冷却到38℃");
	}

}
